package cn.smbms.mapper.storagerecord;

import cn.smbms.pojo.StorageRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Auther: liyuxuan
 * @Date:2021/10/18 - 10 - 18 - 13:36
 */
public interface StorageRecordMapper {
    /**
     * 增加入库记录
     * @param record
     * @return
     * @throws Exception
     */
    public int add(StorageRecord record);


    /**
     * 通过查询条件获取供应商列表-模糊查询-getBillList
     * @param record
     * @return
     * @throws Exception
     */
    public List<StorageRecord> getStorageRecordList(@Param("record") StorageRecord record,@Param("currentPageNo") int currentPageNo,@Param("pageSize") int pageSize);

    /**
     * 通过delId删除Bill
     * @param delId
     * @return
     * @throws Exception
     */
    public int deleteBillById(String delId);


    /**
     * 通过billId获取Bill
     * @param id
     * @return
     * @throws Exception
     */
    public StorageRecord getBillById(String id);

    /**
     * 修改入库信息
     * @param record
     * @return
     * @throws Exception
     */
    public int modify(StorageRecord record);

    /**
     * 根据供应商ID查询入库记录数量
     * @param providerId
     * @return
     * @throws Exception
     */
    public int getBillCountByProviderId(String providerId);

    public int count(StorageRecord record);
    public List<StorageRecord> findASassociation(StorageRecord record);
    public int getSupplierId (String supplierId);
    public List<StorageRecord> finaAllByArray(Long[] supplierId);
    public List<StorageRecord> finaAllByList(List<Long> supplierIdList);
    public List<StorageRecord> billCodeGetStoragaRecordByMap(Map<String,Object> map);
}
